package cn.myschool.test.day3;

import cn.myschool.dao.ExamDao;
import cn.myschool.entity.ExamResult;
import cn.myschool.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class ResutlAll {
    public static void main(String[] args) {
        SqlSession s = MybatisUtil.get();
        ExamDao mapper = s.getMapper(ExamDao.class);
        List<ExamResult> all = mapper.findALL();
        all.forEach(x->{
            System.out.println(x);
            System.out.println("学生:"+x.getStu());
            System.out.println("所考科目:"+x.getSubject());
            System.out.println("?????????????????????????????????");
        });
        MybatisUtil.close(s);
    }
}
